/**
 * Copyright (C), 2015-2019, 山东桔灯行信息科技有限公司
 * FileName: LockOrder
 * Author:   chen
 * Date:     19-5-28 上午10:35
 * Description: 锁定订单model
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.duochuang.verifycard.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.annotations.OnDelete;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

/**
 * 〈一句话功能简述〉<br> 
 * 〈锁定订单model〉
 *
 * @author chen
 * @create 19-5-28
 * @since 1.0.0
 */
@Entity
@Table(name = "t_lock_order")
@EntityListeners(value = AuditingEntityListener.class)
@Data
public class LockOrder {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    /**
     * {
     *     "status": "success",
     *     "desc": "交易成功",
     *     "code": "00",
     *     "serialno": "",
     *     "orderId": "55331890",
     *     "uid": "1000113400003407665",
     *     "itemFacePrice": 100000,
     *     "flow": null,
     *     "bizId": 600,
     *     "cardNo": null,
     *     "cardPwd": null,
     *     "itemId": 17118,
     *     "amt": 1,
     *     "success": true
     * }
     */

    /**
     * status : success
     * desc : 交易成功
     * code : 00
     * serialno : null
     * orderId : null
     * uid : null
     * itemFacePrice : null
     * flow : null
     * bizId : null
     * cardNo : null
     * cardPwd : null
     * itemId : null
     * amt : null
     * success : true
     */

    private String status; //
    @Column(name = "description")
    private String desc;
    private String code;
    private String serialno;
    private String orderId;
    private String uid;
    private String itemFacePrice;
    private String flow;
    private String bizId;
    private String cardNo;
    private String cardPwd;
    private String itemId;
    private String amt;
    private boolean success;

    private Boolean callbackStatus;// 回调状态
    @Column(length = 2000)
    private String callbackData;// 回调状态
    @CreatedDate
    @JsonFormat(timezone = "GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @LastModifiedDate
    @JsonFormat(timezone = "GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
